package com.itheima.proxy.cglib;

import org.springframework.cglib.proxy.Enhancer;

/**
 * @program: design
 * @description:
 * @author: zhanghz001
 * @create: 2020-11-26 17:30
 **/
public class SFangTest {
    public static void main(String[] args) {
        //qfang产生代理
        LandlordService landlordService = new Landlord();
        SFangProxy sFang = new SFangProxy(landlordService);
        LandlordService landlordServiceProxy = (LandlordService)
                Enhancer.create(landlordService.getClass(), sFang);
        landlordServiceProxy.pay("张三");

    }
}
